<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}food/css/style.css" />
<link rel="shortcut icon" href="${pageContext.request.contextPath}food//img/meituan.ico" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}food/css/iconfont.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}food/css/hotel.css" />

<link rel="stylesheet" href="${pageContext.request.contextPath}css/bootstrap.min.css" />
<script src="${pageContext.request.contextPath}food/js/jquery-1.11.3.min.js" type="text/javascript"
	charset="utf-8"></script>
 <script src="${pageContext.request.contextPath}js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
<script src="${pageContext.request.contextPath}shops-map.js" type="text/javascript" charset="utf-8"></script>

<style type="text/css">
.ac {
	position: relative; 
	margin: auto;
	font-size: 12px;
	height: 315px;
	color: #666;
	background-color: #fff;
	border-radius: 10px;
	padding: 20px 20px 33px;
	border: 1px solid #e5e5e5;
	box-shadow: 0 5px 14px 0 rgba(0, 0, 0, .1);
	width: 1200px;
	font-size: 12px
}

.ac1 {
	float: left;
	width: 748px;
	padding-right: 20px;
}

.ac2 {
	font-size: 26px;
	line-height: 37px;
}

.ac5 {
	width: 200px;
	height: 80px;
	position: relative;
	margin: 12px auto;
	font-size: 20px;
	line-height: 26px;
	left: -480px
}

.ad {
	height: 500px;
	width: 400px;
	background-color: wheat;
}

button {
	position: absolute;

	width: 140px; 
	height: 80px;
	margin-left: 200px;
	
	width: 200px;
	top: 420px  
}

.ad {
	position: absolute;
	right: 0;
}
</style>
</head>

<body>

    	<jsp:include page="../head.jsp" /> 
	 <c:import url="/header.do" /> 
	<div id="meituanwang">
		<!--头部内容开始--> 
 <%-- 	 	<div id="header">
			<div class="container"> 
				<div class="city">
					<i></i> <span>长沙</span> <span class="qhcs">切换城市</span>[ <a href=""
						class="active">湘潭</a> <a href="" class="active">宁乡</a> <a href=""
						class="active">株洲</a>]
				</div> 
				<div class="login">
					<span>${root.username==null?"":"欢迎回来 ！"}</span> <a
						href="${root.username==null?'./login.jsp':""}">${root.username==null?"立即登录":root.username}</a>
					<a href="./registe.jsp" class="loginIn">${root.username==null?"注册":""}</a>
				</div>
				<div class="link">
					<li class="nav"><a href="">我的时尚</a>
						<ul class="link-second mine">
							<li><a
								href="${root.username==null?'login.jsp':'dingdan.jsp'}">我的订单</a></li>
							<li><a href="#">我的评价</a></li>
							<li><a href="#">我的收藏</a></li>
							<li><a href="./index.jsp">首页</a></li>
							<li><a href="#">账号设置</a></li>
						</ul></li>
					<li><a href="">手机APP</a></li>
					<li class="nav"><a href="">商家中心</a>
						<ul class="link-second merchant">
							<li><a href="#">登录商家中心</a></li>
							<li><a href="#">我想合作</a></li>
							<li><a href="#">手机免费开店</a></li>
							<li><a href="#">餐饮代理商招募</a></li>
							<li><a href="#">商家申请开票</a></li>
						</ul></li>
					<li class="nav"><a href="">网站导航</a>
						<ul class="link-second wangzhan clearfix">
							<dl class="header-hotel">

								<a href="#">客栈</a>
								</dd>
								<dd>
									<a href="#">客栈</a>
								</dd>
								<dd>
									<a href="#">客栈</a>
								</dd>
								<dd>
									<a href="#">客栈</a>
								</dd>
								<dd>
									<a href="#">客栈</a>
								</dd>
								<dd>
									<a href="#">客栈</a>
								</dd>
								<dd>
									<a href="#">客栈</a>
								</dd>
								<dd>
									<a href="#">客栈</a>
								</dd>
								<dd>
									<a href="#">客栈</a>
								</dd>
								<dd>
									<a href="#">客栈</a>
								</dd>
								<dd>
									<a href="#">客栈</a>
								</dd>
							</dl>




						</ul></li>
				</div>
			</div>

		</div>  --%>
		<!--头部结束-->

		<!--搜索栏开始-->
		<div id="search" style="height: 120px;">
			<div class="container">
				<div class="search_con">
					<div class="logo">
						<a href="javascript:void(0)"><img src="../img/logo4.png" onerror=src="../img/_noimg.png" style="width:150px;height: 70px"/></a> <span
							style="margin-left: 20px; color: #222; font-size: 16px;">饭店</span>
						<div class="wholeBox ">
							<span class="whole">全部分类</span> 
							<div class="link-second catogrey">
								<ul>
									<li><a href="#">美食</a></li>
									<li><a href="#">外卖</a></li>

								</ul>
							</div>
						</div>
					</div>
					<div class="search_right">
						<ul>
							<li><i></i> <a href="">随时退</a></li>
							<li><i></i> <a href="">不满意免单</a></li>
							<li><i></i> <a href="">过期退</a></li>
						</ul>
					</div>

				</div>
			</div>

		</div>
		<!--搜索栏结束-->

		<!--条件选择区域-->
		<div class="choose">

			<div class="ac">
				<div class="ac1">

					<div class="ac2">禾绿牌寿司店</div>
					<div style="height: 15px"></div>
					<div>
						<hr>
					</div>
					<div style="margin-top: 8px">地址：湖南省湘乡市</div>
					<div style="margin-top: 8px">电话：1577575757577</div>
					<div style="margin-top: 8px">营业时间：全天营业</div>
					<div>
						<hr>
					</div>

					<img alt="" src="img/提供无线.png" onerror=src="../img/_noimg.png" style="width: 50px;height: 50px;margin-top: 10px" >
					<p>提供无线</p>
				</div>

				<div style="text-align: right;">
			
					<img alt="" src="./img/q1.jpg" onerror=src="../img/_noimg.png" style="width: 280px;height: 280px"/>
				</div>
				<div style=" width:800px;height: 500px;position: relative;left: 1200px;top: -300px"><iframe name="gis" style="width: 40%; height: 60%;frameborder="0" src="${map}"></iframe></div> 
			</div>
 
 
			<!-- <img alt="" src="./img/chaofan.jpg"> -->
			<div class="ac5">
				<h3>商家及团购优惠</h3>
				 
			</div>

		</div>

	

		<!--条件选择区域结束-->
 
		<!--酒店信息展示区域-->

		<div class="con clearfix">

			<div class="con_left">
				<div class="hotel_title">
					<ul>
						<li><a href="#" style="color: #06c1ae;">智能排序</a></li>
						<li><a href="#">价格</a></li>
						<li><a href="#">好评优先</a></li>
						<li><a href="#">人气优先</a></li>
					</ul>
				</div>
			<%-- 	<c:choose> 
					<c:when test="${ root.username!=null }">
					
 --%>                 
                           
                    	<c:choose>
					<c:when test="${user.userName!=null }">    
				  	<c:forEach items="${p.list}" var="a">
				  	 
					 <div class="hotel_item aaa">
								 <img src="${a.foodGoodsImg}"  style="width: 180px;height:180px" /> 
							
								<div class="hotel_desc">
									<div class="hotel_name">
										<em>1</em> <a href="#"></a>
									</div>  
 
									<div class="location name">
										<h2>${a.foodGoodsName }</h2>
										<span style="color: #13D1BE;">查看地图</span>
									</div>

								</div> 
								<div class="score">
									<div class="score_info">
										<span style="font-size: 23px;"></span>分 很好
									</div>
									<span class="number">5000+人消费</span> <a href="#"
										class="pinglun">查看评论</a>
								</div>
								<div class="h_price"> 
									<span style="font-size: 12px;">￥</span><span class="pri">${a.foodGoodsPrice}</span><span
										style="font-size: 12px;">起</span>
									<div style="height: 15px"></div>
						
									<a href="javascript:void(0)" class="look lz" data-type = "${a.foodGoodsId}">立即购买</a> 
		 							<a href="javascript:void(0)" class="look caidan cd" data-type = "${a.foodGoodsId}"	style="position: relative; margin: auto; top: 20px">加入菜单</a>
								</div>
							</div>
							
							<div style="height: 50px"></div> 
				 
				 		</c:forEach> 
						<!-- 分页栏 -->

						<div class="bs-example"
							data-example-id="disabled-active-pagination" style="position: relative;margin-left: 400px">
							<nav aria-label="...">
							<ul class="pagination dis">
								<li class="${p.hasPreviousPage==false?'disabled':''}"><a
									href="shangjia.do?pg=${p.pageNum-1 }&shopId=${d}" aria-label="Previous"><span
										aria-hidden="true">«</span></a></li>
								<c:forEach begin="1" end="${p.pages }" var="p1">
									<li class="${p1==p.pageNum?'active':'' }"><a
										href="shangjia.do?pg=${p1}&shopId=${d}">${p1} <span class="sr-only"></span></a></li>
								</c:forEach>
								<li class="${p.hasNextPage==false?'disabled':''}"><a
									href="shangjia.do?pg=${p.pageNum+1 }&shopId=${d}" aria-label="Next"><span
										aria-hidden="true">»</span></a></li>
							</ul> 
							</nav>
						</div>
					<%-- 	<div
							style="font-size: 25px; position: relative; margin: auto; left: 650px; top: -50px">
							<span>第</span> <span>${p.page }</span> <span>页</span> <span>共</span>
							<span><input type="text" value="" disabled="disabled"
								id="inp" style="width: 50px; text-align: center;"></span> <span>条数据</span>
						</div> --%>
				
						<div class="ad">
							<div style="font-size: 20px">
			
                              <table class="table">
                                    <tr>
                                     <td class="active">名称</td>
                                      <td class="success">价格</td>
                                      <td class="warning">数量</td>
                                           <td class="warning">操作</td>
                                    </tr>
                                    </table>
							</div>
								<div style="height: 50px; font-size: 20px; margin-top: 20px" class="tab">
				    <table class="table tt1">
				 
								
						  <tr class="trr"> 
           
               
                       <td class="carPame"><!--<input type="text" value="" data-price="" disabled="disabled" style="width: 60px;text-align: center;"/><input type="hidden" value="" class="price"/>--></td>
                       <td class="carOneprice"><!--<a  href="" class="dianwo-"> <input type="button" style="width: 50px" value="-" class="jian btn btn-success" /></a>--></td>
                       <td class="carPount"><!--<input type="text" value="" style="width: 50px;text-align: center;" class="zhi" />--></td>
                       <td ><!--<a href="uppd?name=" class="dianwo" ><input type="button" style="width: 50px" value="+" class="jia btn btn-success" /></a>-->	</td> 
                       <td><!--<a href="" class="del" ><input type="button" style="width: 50px" value="x" class="btn btn-success" /></a>	--></td> 
                       
                          </tr>  
						 
					
						     </table>
								</div>

 



						<a href="pay2.do" ><button type="button" class="btn btn-danger tj" style="left: 250px;width: 150px"><span class="glyphicon glyphicon-shopping-cart" style="font-size: 4em;margin-left: 20px"></span></button></a>
						</div>
 	</c:when>
					<c:otherwise>
						<a href="login.html"><div
								style="height: 250px; position: relative; margin: auto; top: 50px; left: 170px; font-size: 22px">请登录</div></a>
					</c:otherwise>
				</c:choose>
 

				<%-- 	</c:when> --%>
				<%-- 	<c:otherwise> --%>
						<!-- <a href="login.jsp"><div
								style="height: 250px; position: relative; margin: auto; top: 50px; left: 170px; font-size: 22px">请登录</div></a> -->
					<%-- </c:otherwise> --%>
			<%-- 	</c:choose> --%>







			</div>
		</div>
	

		<!--页脚部分-->
		<div id="footer">
			<div class="footer_con">
				<div class="footer_top clearfix">
					<ul>
					

					</ul>
					<ul>
				

					</ul>
					<ul>
					
					</ul>
					<ul>
				

					</ul>

				</div>

				<!--页脚部分结束-->
 

			</div>
   
		</div>
	 	<script src="${pageContext.request.contextPath}food/js/add.js" type="text/javascript" charset="utf-8"></script> 
		<script type="text/javascript">
		
	
		
			$("#inp").val($(".aaa").length);

	
			if ($(".dis>li").last().is(".disabled")) {

				$(".dis>li").last().children().attr("href",
						"javascript:void(0)");

			} 

			if ($(".dis>li").first().is(".disabled")) {
				$(".dis>li").first().children().attr("href",
						"javascript:void(0)");
			}

			//设置框不会滚动
			function rightBottomAd() {
				var rbtb = $(".ad");
				rbtb.css("top", $(document).scrollTop() + $(window).height()
						- rbtb.height() - 20 + "px");
				setTimeout(rightBottomAd, 50);
			}
			rightBottomAd();
			

      //加载下拉菜单 
      $("body").on("click",".dropdown",function(){
   
     //  alert($(this).children().attr("aria-expanded"))
         if( $(this).children().attr("aria-expanded")=="false"){
      
        	   $(this).addClass("open");
        	   $(this).children().attr("aria-expanded","true");
              }else{
            	  $(this).removeClass("open");
            	 $(this).children().attr("aria-expanded","false");
                 } 
    
           
          })
          
      
		
		
			
			
			
	
			

		
		</script>
</body>

</html>
